#pragma once
#include <qbkernel/include/qb_base.h>
#include <qbprotocol/include/SSQBModel.h>
#include <qbprotocol/include/rdProto.h>
#include <widgets/SPopupWindow.h>

#include <list>
#include <vector>

class QLabel;
class QHBoxLayout;
class QGridLayout;
class BrokerContact : public SPopupWindow {
  Q_OBJECT
 public:
  BrokerContact(QWidget* p = nullptr);
  void UpdataContactList(int brokerId, int bondIndex);

 private:
  void drawContent(std::list<xQBTradeCmpContact_c>::iterator content,
                   QGridLayout* grid, int row, int col);

 protected slots:
  void closeBtn();

 private:
  QLabel* m_brokerTips;
  QHBoxLayout* m_contactLayout;
  bool m_IsBondNCD;
  std::list<xQBTradeCmpContact_c> m_contactList;
  int m_id;
  std::vector<QLabel*> m_gridItem;
};
